$(function () {
    $(".btn-product").on("click",function () {
        $(".modal").css("display","block");
        $(".modal").addClass("in");
        $(".modal-backdrop").addClass("in");
    });
});

function operateFormatter(code, row) {
    var trId = row.id;
    var operateBtn = [
        '<a class="btn btn-sm btn-success btn-update" data-id="' + trId + '" title="编辑"><i class="fa fa-edit fa-fw"></i></a></div>',
        '<a class="btn btn-sm btn-danger btn-remove" data-id="' + trId + '" title="删除"><i class="fa fa-trash-o fa-fw"></i></a></div>'
    ];
    return operateBtn.join('');
}

function paramsMatter(value) {
    var span=document.createElement('span');
    span.setAttribute('title',value);
    span.innerHTML = value;
    return span.outerHTML;
}

function checkboxMatter() {
    var span=document.createElement('span');
    span.setAttribute('title',"");
    span.innerHTML = "";
    return span.outerHTML;
}

function formatTableUnit() {
    return {
        css: {
            "white-space": 'nowrap',
            "text-overflow": 'ellipsis',
            "overflow": 'hidden'
        }
    }
}